package com.dy.nygl.mapper;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import com.dy.nygl.pojo.DeviceLog;

@Component("deviceLogDAO")
public interface DeviceLogMapper {
	public void addDeviceLog(@Param("dl")DeviceLog dl);
	public DeviceLog getDeviceLogByMaxAndId(@Param("id")int id);
	public void updateDeviceLog(@Param("dl")DeviceLog dl);
	
	public List<Integer> getDeviceIdByGroup(@Param("begin")Date begin,@Param("end")Date end);
	public List<DeviceLog> getDeviceLogError(@Param("begin")Date begin,@Param("end")Date end);
	public List<DeviceLog> getDeviceLogErrorByPages(@Param("begin")int begin, @Param("rowsPage")int rowsPage);
	public int getDeviceLogErrorCount();
	
	public List<Integer> getDeviceIdOnGroup();
	public List<DeviceLog> getDeviceLogOnWorkTime();
	public List<DeviceLog> getDeviceLogOnErrorTime();
}
